<extend name="Index/index"/>
<block name="main">

		<title>购物车页面</title>

		<link href="__PUBLIC__/static/css/cartstyle.css" rel="stylesheet" type="text/css" />
		<link href="__PUBLIC__/static/css/optstyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="__PUBLIC__/static/js/jquery.js"></script>
		<script type="text/javascript" src="__PUBLIC__/my.js"></script>

	</head>

	<body>
		<!--顶部导航条 -->
		<include file="Public/top" />
			
			<form action="<{:U('Order/index')}>" method="post">
			<!--购物车 -->
			<div class="concent">
				<div id="cartTable">
					<div class="cart-table-th">
						<div class="wp">
							<div class="th th-chk">
								<div id="J_SelectAll1" class="select-all J_SelectAll">

								</div>
							</div>
							<div class="th th-item">
								<div class="td-inner">商品信息</div>
							</div>
							<div class="th th-price">
								<div class="td-inner">单价</div>
							</div>
							<div class="th th-amount">
								<div class="td-inner">数量</div>
							</div>
							<div class="th th-sum">
								<div class="td-inner">金额</div>
							</div>
							<div class="th th-op">
								<div class="td-inner">操作</div>
							</div>
						</div>
					</div>
					<div class="clear"></div>
					
					<foreach name="_SESSION['Mycar']" item = "vo" key="k">
					<tr class="item-list">
						<div class="bundle  bundle-last ">
							
							<div class="bundle-main">
								<ul class="item-content clearfix">
								

									<li class="td td-chk">
										<div class="cart-checkbox ">
											<label><input class="check check-one"  value="170037950254" type="checkbox" checked></label>
											<label for="J_CheckBox_170037950254"></label>
										</div>
									</li>
									<li class="td td-item">
										<div class="item-pic">
										
											<a href="#" target="_blank" data-title="<{$vo['des']}>" class="J_MakePoint" data-point="tbcart.8.12">
												<img src="__UPLOAD__/<{$vo['img']}>" class="itempic J_ItemImg" width='80'></a>
										</div>
										<div class="item-info">
											<div class="item-basic-info">
												<a href="#" target="_blank" title="<{$vo['des']}>" class="item-title J_MakePoint" data-point="tbcart.8.11"><{$vo['des']}></a>
											</div>
										</div>
									</li>
									<li class="td td-info">
										<div class="item-props item-props-can">
											<span class="sku-line">颜色：12#川南玛瑙</span>
											<span class="sku-line">包装：裸装</span>
											<span class="sku-line">库存: <span class="In-stock"><{$vo['stock']}></span></span>
											<span tabindex="0" class="btn-edit-sku theme-login">修改</span>
											<i class="theme-login am-icon-sort-desc"></i>
										</div>
									</li>
									<li class="td touch td-price">
										<div class="item-price price-promo-promo">
											<div class="price-content">
												
												<div class="price-line">
													<em class="J_Price price-now price p<{$k}>" tabindex="0"><{$vo['price']}></em>
												</div>
											</div>
										</div>
									</li>
									<li class="td touch td-amount">
										<div class="amount-wrapper ">
											<div class="item-amount ">
												<div class="sl">
													<input class="min am-btn" name="" type="button" value="-" />
													<input class="text_box" name="number-<{$k}>" type="text" value="<{$vo['num']}>" style="width:30px;" />
													<input class="add am-btn" name="" type="button" value="+" />
												</div>
											</div>
										</div>
									</li>
									<li class="td td-sum">
										<div class="td-inner">
											<em tabindex="0" class="J_ItemSum number"><{$vo['price']}></em>
										</div>
									</li>
									<li class="td td-op">
										<div class="td-inner">
											<a data-point-url="#" class="delete">删除</a>
											<a href="" class="<{$vo['gid']}>"></a>
										</div>
									</li>
									
								</ul>
								
								
							</div>
						</div>
					</tr>
					</foreach>
					<div class="clear"></div>

				</div>
				<div class="clear"></div>

				<div class="float-bar-wrapper">


					<div id="J_SelectAll2" class="select-all J_SelectAll">
						<div class="cart-checkbox">
							<label><input class="check-all check" name="select-all" value="true" type="checkbox"><span>全选</span></label>
							<label for="J_SelectAllCbx2"></label>
						</div>
						
					</div>

					<div id="J_SelectAll3" class="select-all J_SelectAll">
						<div class="cart-checkbox">
							<label><input class="check-null check" name="select-all" value="true" type="checkbox"><span>取消</span></label>
							<label for="J_SelectAllCbx2"></label>
						</div>
						
					</div>


					<div class="operations">

						<a href="<{:U('Shopcart/del')}>" class="url"></a>

					</div>
					<div class="float-bar-right">
						<div class="amount-sum">
							<span class="txt">已选商品</span>
							<em id="J_SelectedItemsCount">0</em><span class="txt">件</span>
							<div class="arrow-box">
								<span class="selected-items-arrow"></span>
								<span class="arrow"></span>
							</div>
						</div>
						<div class="price-sum">
							<span class="txt">合计:</span>
							<strong class="price">¥<em id="J_Total">0.00</em></strong>
						</div>
						
							<input type="submit" id="J_Go" class="btn-area" value="购买->" style="color:#fff">
								
					</div>

				</div>
				</form>
			</div>


		<!--引导 -->
		<div class="navCir">
			<li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
			<li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
			<li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>	
			<li><a href="../person/index.html"><i class="am-icon-user"></i>我的</a></li>
		</div>
		<script>
		$(function(){
			$('.delete').click(function(){
			var gid = $(this).next().attr('class');
			var url = $('.url').attr('href');
			var del = $(this).parents('.bundle');
			var sel = $(this).parents('.td-op').siblings().first().find('input[class*=check-one]');
			// console.log($(this).parents('.td-op').siblings().first().find('input[class*=check-one]'));
			// console.log(url+"?gid="+gid);
			// var rid = 
			// console.log($(this).parents());
			
			$.ajax({
				type:'get',
				url:url+"?n=0&gid="+gid,
				success:function(data){
					sel.checked = false;
					del.hide();
					}
				})
			})
			
		})
		</script>
</block>